package com.crm.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.crm.dao.MessageDao;
import com.crm.entity.Message;
import com.crm.service.MessageService;

//消息服务层实现类
@Service
public class MessageServiceImpl implements MessageService{
	@Autowired
	private MessageDao messageDao;

	@Override
	public Integer add(Message message) {
		// TODO Auto-generated method stub
		return messageDao.add(message);
	}

	@Override
	public List<Map<String, Object>> noRead(String askerName) {
		// TODO Auto-generated method stub
		return messageDao.noRead(askerName);
	}

	@Override
	public List<Map<String, Object>> getAll(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return messageDao.getAll(map);
	}

	@Override
	public Integer noReadCount(String askerName) {
		// TODO Auto-generated method stub
		return messageDao.noReadCount(askerName);
	}

	@Override
	public Integer getAllCount(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return messageDao.getAllCount(map);
	}

	@Override
	public Integer update(Message message) {
		// TODO Auto-generated method stub
		return messageDao.update(message);
	}

}
